<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<c:set var="reportTitle" value="OOS查询报表" />

<%@ include file="/common/report_head.jsp" %>
<%@ include file="/condition/sartTime_input.html"%>
<%@ include file="/condition/endTime_input.html"%>
<%@ include file="/condition/fab_sumo_must.html"%>
<%@ include file="/condition/line_sumo.html"%>
<%@ include file="/condition/ope_sumo.html"%>
<%@ include file="/condition/shift_sumo.html"%>

<%@ include file="/common/report_middle.jsp" %>
<div class="col-md-12" style="height: 820px;">
    <div id="pqGrid"></div>
</div>
<%@include file="/common/report_end.jsp" %>


<script>
    $(document).ready(function () {
        $("title").text("OOS查询报表");

        $('#query_btn').click(function (){
            initGridAndChart();
            ajax('/jn-report/report/oos_report.do' ,loadConditionMapData(), true, ajax_successful);

            function ajax_successful(outTrxObj) {
                if(outTrxObj.gridData.length < 1) { showMessengerDialog("数据查询为空"); return false; }

                //grid表格数据
                var colM = [
                    {halign:"center",align:'center', dataIndx: 'input_timestamp',	title: 'INPUT日期',   width: 250,   editable: false, sortable: true},
                    {halign:"center",align:'center', dataIndx: 'fab_id_fk',      	title: '厂别',        width: 120,   editable: false, sortable: true},
                    {halign:"center",align:'center', dataIndx: 'p_ope_id_fk',    	title: '站点',        width: 150,   editable: false, sortable: true},
                    {halign:"center",align:'center', dataIndx: 'p_tool_id_fk',   	title: '设备代码',    width: 220,   editable: false, sortable: true},
                    {halign:"center",align:'center', dataIndx: 'data_group_fk',  	title: '量测名称',    width: 220,   editable: false, sortable: true},
                    {halign:"center",align:'center', dataType: 'float', dataIndx: 'chart_value',    	title: '点值',        width: 150,   editable: false, sortable: true},
                    {halign:"center",align:'center', dataIndx: 'chart_usl_fk',      title: '上规格线',	  width: 150,   editable: false, sortable: true},
                    {halign:"center",align:'center', dataIndx: 'chart_lsl_fk',      title: '下规格线',	  width: 150,   editable: false, sortable: true}
                ];
                _pqUtil.f.setColModel($("#pqGrid"), colM);
                _pqUtil.f.seTitle($("#pqGrid"), outTrxObj.gridTitle);
                _pqUtil.f.loadPqGridData($("#pqGrid"), outTrxObj.gridData);
            };
        });

    });
</script>
